clear all

use "9089.119_TESS 119 Clifford.dta"

set scheme plotplain

*****************************
*** Organize
*****************************

* rename outcome variables
rename Q7A feel1
rename Q7B neighbor1
rename Q7C house1
rename Q8A feel2
rename Q8B neighbor2
rename Q8C house2
rename Q9A feel3
rename Q9B neighbor3
rename Q9C house3
rename Q10A feel4
rename Q10B neighbor4
rename Q10C house4
rename Q11A feel5
rename Q11B neighbor5
rename Q11C house5
rename Q12A feel6
rename Q12B neighbor6
rename Q12C house6

* reshape to respondent-profile level
reshape long VALUETOSHOW_ GENDER_ AGE_ ETHNICITY_ PARTISANSHIP_ CAREER_ RELIGION_ EDUCATION_ FAVORITEHOBBY_ feel neighbor house StatementsToShowRandomQ7_, i(CaseId) j(profile)

* all outcome variables should be positive attitudes for higher values
recode feel 1=7 2=6 3=5 5=3 6=2 7=1 98=.
label define Q12A 7 "Very positive" 6 "Positive" 5 "Slightly positive" 4 "Neutral" 3 "Slightly negative" 2 "Negative" 1 "Very negative", modify
recode neighbor 1=5 2=4 4=2 5=1 98=.
label define Q12B 5 "Very happy" 4 "Somewhat happy" 3 "Neither happy nor unhappy" 2 "Somewhat unhappy" 1 "Very unhappy", modify
recode house 98=.

* create variable indicating value item
gen itemnum=StatementsToShowRandomQ7_

* create variable indicating value
gen value=.
replace value=1 if itemnum<=4
replace value=2 if itemnum>=5 & itemnum<=7
replace value=3 if itemnum>=8 & itemnum<=11
replace value=4 if itemnum>=12 & itemnum<=14
replace value=5 if itemnum>=15 & itemnum<=20
replace value=6 if itemnum>=21 & itemnum<=24
replace value=7 if itemnum>=25 & itemnum<=29
replace value=8 if itemnum>=30 & itemnum<=32
replace value=9 if itemnum>=33 & itemnum<=36
replace value=10 if itemnum>=37 & itemnum<=40
replace value=11 if itemnum>=41 & itemnum<=46
replace value=12 if itemnum>=47 & itemnum<=52
replace value=13 if itemnum>=53 & itemnum<=58
replace value=14 if itemnum>=59 & itemnum<=64
replace value=15 if itemnum>=65 & itemnum<=70
replace value=16 if itemnum>=71 & itemnum<=78
replace value=17 if itemnum>=79 & itemnum<=86
replace value=18 if itemnum>=87 & itemnum<=88
replace value=19 if itemnum>=89 & itemnum<=90
replace value=20 if itemnum>=91 & itemnum<=96
replace value=21 if itemnum>=97 & itemnum<=102
label define valuel 1 "S: Self-Direction" 2 "S: Hedonism" 3 "S: Benevolence" 4 "S: Power" 5 "S: Universalism" 6 "S: Achievement" 7 "S: Security" 8 "S: Stimulation" 9 "S: Conformity" 10 "S: Tradition" 11 "MF: Care" 12 "MF: Fairness" 13 "MF: Loyalty" 14 "MF: Authority" 15 "MF: Sanctity" 16 "P: Equality" 17 "P: Humanitarianism" 18 "P: Moral Traditionalism" 19 "P: Moral Tolerance" 20 "P: Individualism" 21 "P: Limited Gov't"
label values value valuel

* Create agree-disagree variable by inserting the value of Q1A_ for corresponding value of itemnum.
gen ad = .
forval x=1/102 {
	replace ad=Q1A_`x' if itemnum==`x'
}
recode ad 98=.

* Create mc variable by inserting the value of Q1B_ for corresponding value of itemnum.
gen mc = .
forval x=1/102 {
	replace mc=Q1B_`x' if itemnum==`x'
}
recode mc 98=.

* Create variable for disagreement with profile.
* 1 if ad is "Strongly agree" or "Somewhat agree" and VALUETOSHOW_ is "Disagrees that..."
* 1 if ad is "Strongly disagree" or "Somewhat disagree" and VALUETOSHOW_ is "Agrees that..."
* 0 if ad is "Strongly agree" or "Somewhat agree" and VALUETOSHOW_ is "Agrees that..."
* 0 if ad is "Strongly disagree" or "Somewhat disagree" and VALUETOSHOW_ is "Disagrees that..."
* NA if ad is "Neither agree nor disagree"
gen disagree = .
replace disagree=1 if ad==2 & VALUETOSHOW_==2
replace disagree=1 if ad==1 & VALUETOSHOW_==2
replace disagree=1 if ad==4 & VALUETOSHOW_==1
replace disagree=1 if ad==5 & VALUETOSHOW_==1
replace disagree=0 if ad==2 & VALUETOSHOW_==1
replace disagree=0 if ad==1 & VALUETOSHOW_==1
replace disagree=0 if ad==4 & VALUETOSHOW_==2
replace disagree=0 if ad==5 & VALUETOSHOW_==2
replace disagree=. if ad==3

* Create typology variable
gen typology=.
replace typology=1 if value<=10
replace typology=2 if value>=11 & value<=15
replace typology=3 if value>=16
label define typologyl 1 "Schwartz" 2 "MFT" 3 "Political", replace
label values typology typologyl

* Give higher values for those who agree with statement.
recode ad 1=5 2=4 4=2 5=1

* Create value support variable. Recode support for reversed statements
gen support=ad
recode support 1=5 2=4 4=2 5=1 if itemnum==73
recode support 1=5 2=4 4=2 5=1 if itemnum==74
recode support 1=5 2=4 4=2 5=1 if itemnum==77
recode support 1=5 2=4 4=2 5=1 if itemnum==78
recode support 1=5 2=4 4=2 5=1 if itemnum==80
recode support 1=5 2=4 4=2 5=1 if itemnum==82
recode support 1=5 2=4 4=2 5=1 if itemnum==84
recode support 1=5 2=4 4=2 5=1 if itemnum==86
recode support 1=5 2=4 4=2 5=1 if itemnum==92
recode support 1=5 2=4 4=2 5=1 if itemnum==94
recode support 1=5 2=4 4=2 5=1 if itemnum==95
recode support 1=5 2=4 4=2 5=1 if itemnum==98
recode support 1=5 2=4 4=2 5=1 if itemnum==99
recode support 1=5 2=4 4=2 5=1 if itemnum==102

* Clean ideology variable
recode PartyID7 -1=.
recode PartyID5 -1=.
recode PartyID7 1/3=1 4=2 5/7=3, gen(PID3)

*party match
gen outparty=0
replace outparty=1 if PID3==1 & PARTISANSHIP_==2
replace outparty=1 if PID3==3 & PARTISANSHIP_==1
gen inparty=0
replace inparty=1 if PID3==1 & PARTISANSHIP_==1
replace inparty=1 if PID3==3 & PARTISANSHIP_==2

* Create a variable that codes people who said "neither agree nor disagree" as disagreeing with the profile
gen disagree2=disagree
replace disagree2=1 if ad==3
label variable disagree "Value Disagreement"

* Create dummy variable for people who said "neither agree nor disagree"
gen neither=.
replace neither=1 if ad==3
replace neither=0 if ad!=3

* Create strength variable
gen strength=.
replace strength=1 if ad==1|ad==5
replace strength=0 if ad==2|ad==4

* Create outcome variables
gen feel01=(feel-1)/6
gen neighbor01=(neighbor-1)/4
gen house01=(house-1)/4
gen polavg=(feel01+neighbor01+house01)/3

// save tess, replace

*****************************
*** Analyses: part 1
*****************************

* typology level: Figure 1 and model 3 of Table D1 in Dataverse
mixed mc ibn.typology if support>3, nocons || CaseId:
est store m1
test 2.typology=3.typology
test 2.typology=1.typology
test 3.typology=1.typology
coefplot m1, keep(*typology) xlab(3.25(.25)4.25) order(1.typology 3.typology 2.typology) subtitle("") xtitle("Moralization") saving(typology.gph, replace) legend(off)

* value level: Figure 2 and model 3 of Table D2 in Dataverse
mixed mc ibn.value if support>3, nocons || CaseId:
est store m2
coefplot m2, keep(*value) xlab(2.5(.5)5) order(4.value 8.value 6.value 2.value 1.value 7.value 10.value 3.value 5.value 9.value 20.value 21.value 19.value 16.value 18.value 17.value 14.value 13.value 15.value 12.value 11.value) subtitle("") xtitle("Moralization") saving(value.gph, replace) 
* fairness vs sanctity
test 12.value=15.value
* benevolence vs care
test 3.value=11.value
* benevolence vs. fairness
test 3.value=12.value
* universalism vs. care
test 5.value=11.value
* universalism vs. fairness
test 5.value=12.value
* conformity vs. sanctity
test 9.value=15.value
* tradition vs. loyalty/authority
test 10.value=13.value
test 10.value=14.value

* by support or opposition, at typology level: Figure A4 in OA and Table D3 in Dataverse

mixed mc ibn.typology if support>3, nocons || CaseId:
est store support_typology

mixed mc ibn.typology if support<3, nocons || CaseId:
est store oppose_typology

coefplot (support_typology, keep(*typology) mcol(gs10) ciopts(col(gs10))) (oppose_typology, keep(*typology) xlab(2.5(.25)4.25) mcol(sky) ciopts(col(sky))), legend(order(2 "Support" 4 "Oppose") pos(6) rows(1)) order(1.typology 3.typology 2.typology) xtitle("Moralization") saving(support_oppose_typology.gph, replace)

* by support or opposition, at value level: Figure A5 in OA and Table D4 in Dataverse

gen supportbeta=.
gen opposebeta=.

mixed mc ibn.value if support>3, nocons || CaseId:
est store support

forval x=1/21 {
	replace supportbeta = _b[`x'.value] in `x'
}

mixed mc ibn.value if support<3, nocons || CaseId:
est store oppose

forval x=1/21 {
	replace opposebeta = _b[`x'.value] in `x'
}

ttest supportbeta=opposebeta

coefplot (support, keep(*value) mcol(gs10) ciopts(col(gs10))) (oppose, keep(*value) mcol(sky) ciopts(col(sky))), saving(support_oppose.gph, replace) legend(order(2 "Support" 4 "Oppose") pos(6) rows(1)) order(4.value 8.value 6.value 2.value 1.value 7.value 10.value 3.value 5.value 9.value 20.value 21.value 19.value 16.value 18.value 17.value 14.value 13.value 15.value 12.value 11.value) subtitle("") xtitle("Moralization")

* value moralization by ideology: Figure A6 in OA and Table D5 in Dataverse

gen libmoral=.
gen conmoral=.

mixed mc ibn.value if support>3 & PartyID7<4, nocons || CaseId:
est store vlib

forval x=1/21 {
	replace libmoral = _b[`x'.value] in `x'
}

mixed mc ibn.value if support>3 & PartyID7>4, nocons || CaseId:
est store vcon

forval x=1/21 {
	replace conmoral = _b[`x'.value] in `x'
}

pwcorr libmoral conmoral, sig
ttest libmoral=conmoral

coefplot (vlib, keep(*value) mcol(blue)) (vcon, keep(*value) mcol(red)), saving(values_ideo.gph, replace) legend(order(2 "Liberals" 4 "Conservatives") pos(6) rows(1)) order(4.value 8.value 6.value 2.value 1.value 7.value 10.value 3.value 5.value 9.value 20.value 21.value 19.value 16.value 18.value 17.value 14.value 13.value 15.value 12.value 11.value) xlab(1(1)5) xtitle("Moralization")

* value endorsement by ideology: Figure A7 in OA and Table D6 in Dataverse

gen libsupp=.
gen consupp=.

mixed support ibn.value if PartyID7<4, nocons || CaseId:
est store supplib

forval x=1/21 {
	replace libsupp = _b[`x'.value] in `x'
}

mixed support ibn.value if PartyID7>4, nocons || CaseId:
est store suppcon

forval x=1/21 {
	replace consupp = _b[`x'.value] in `x'
}

coefplot (supplib, keep(*value) mcol(blue)) (suppcon, keep(*value) mcol(red)), saving(support_ideo.gph, replace) legend(order(2 "Liberals" 4 "Conservatives") pos(6) rows(1)) order(4.value 8.value 6.value 2.value 1.value 7.value 10.value 3.value 5.value 9.value 20.value 21.value 19.value 16.value 18.value 17.value 14.value 13.value 15.value 12.value 11.value) xtitle("Moralization")

pwcorr libsupp consupp, sig

* Means and variances of moral conviction by universalist, particularist, and non-cooperative
tabstat mc if support>3 & (value==3 | value==5 | value==11 | value==12 | value==16 | value==17 | value==19), stat(N mean sd var)
tabstat mc if support>3 & (value==7 | value==9 | value==10 | value==13 | value==14 | value==15 | value==18), stat(N mean sd var)
tabstat mc if support>3 & (value==1 | value==2 | value==4 | value == 6 | value==8 | value==20 | value==21), stat(N mean sd var)

* correlation between moralization and strength of value endorsement
pwcorr mc support if support >3, sig

*****************************
*** Analyses: part 2 - 1
*****************************

*main effect of value disagreement: Table D7 in Dataverse

regress polavg disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

*main effect of value disagreement, by ideology: Table D8 in Dataverse

regress polavg disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ if PartyID7<4, vce(cluster CaseId)

regress polavg disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ if PartyID7>4 & PartyID7 <8, vce(cluster CaseId)

*main effect of value disagreement, including profile's partisanship: Table D9 in Dataverse

regress polavg disagree ib3.PARTISANSHIP i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

* separate outcomes analyses: Table D10 in Dataverse

regress feel01 disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

regress neighbor01 disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

regress house01 disagree inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

*****************************
*** Analyses: part 2 -2
*****************************

* Interactive model, excluding people who said "neither agree nor disagree": Figure 4 and Table A3 in Online Appendix

regress feel01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ , vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Favorability") saving(fav_intx.gph, replace)

regress neighbor01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Neighbor") saving(neigh_intx.gph, replace)

regress house01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("House") saving(house_intx.gph, replace)

graph combine fav_intx.gph neigh_intx.gph house_intx.gph, subtitle("") rows(2) saving(intx_each.gph, replace)

*testing slope differences
regress feel01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store intfav

regress neighbor01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store intnei

regress house01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store inthou

suest intfav inthou intnei, cluster(CaseId)
test [intfav_mean]1.disagree#c.mc=[intnei_mean]1.disagree#c.mc
test [intfav_mean]1.disagree#c.mc=[inthou_mean]1.disagree#c.mc
test [intnei_mean]1.disagree#c.mc=[inthou_mean]1.disagree#c.mc

*testing slope differences - low end of MC
gen mc01=(mc-1)/4

regress feel01 disagree##c.mc01 i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store intfav01

regress neighbor01 disagree##c.mc01 i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store intnei01

regress house01 disagree##c.mc01 i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_
est store inthou01

suest intfav01 inthou01 intnei01, cluster(CaseId)
test [intfav01_mean]1.disagree=[intnei01_mean]1.disagree
test [intfav01_mean]1.disagree=[inthou01_mean]1.disagree
test [intnei01_mean]1.disagree=[inthou01_mean]1.disagree

* Including people who said "neither agree nor disagree": Figure A11 in Online Appendix and models 1-3 of Table D11 in Dataverse

regress feel01 disagree2##c.mc c.neither##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree2) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Favorability") saving(fav_intx_nn.gph, replace)

regress neighbor01 disagree2##c.mc c.neither##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree2) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Neighbor") saving(neigh_intx_nn.gph, replace)

regress house01 disagree2##c.mc c.neither##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree2) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("House") saving(house_intx_nn.gph, replace)

graph combine fav_intx_nn.gph neigh_intx_nn.gph house_intx_nn.gph, subtitle() rows(2) saving(intx_nn_each.gph, replace)

* robustness to respondent FEs, excluding people who said "neither agree nor disagree": Figure A12 in Online Appendix and models 4-6 of Table D11 in Dataverse

xtset CaseId

xtreg feel01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ , fe vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Favorability") saving(fav_intx_fe.gph, replace)

xtreg neighbor01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, fe vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Neighbor") saving(neigh_intx_fe.gph, replace)

xtreg house01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, fe vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("House") saving(house_intx_fe.gph, replace)

graph combine fav_intx_fe.gph neigh_intx_fe.gph house_intx_fe.gph, rows(2) saving(intx_fe_each.gph, replace)

* Analyses among value endorsers: Figure A13 in Online Appendix and models 1-3 of Table D12 in Dataverse

* fav

regress feel01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ if support >3, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Favorability (Among Value Endorsers)") saving(fav_intx_endorse.gph, replace)

* neighbor

regress neighbor01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ if support >3, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Neighbor (Among Value Endorsers)") saving(neigh_intx_endorse.gph, replace)

* house

regress house01 disagree##c.mc i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_ if support >3, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("House (Among Value Endorsers)") saving(house_intx_endorse.gph, replace)

graph combine fav_intx_endorse.gph neigh_intx_endorse.gph house_intx_endorse.gph, rows(2) saving(intx_endorse_each.gph, replace)

* Interactive model, excluding people who said "neither agree nor disagree", including strength of attitude: Figure A14 in Online Appendix and models 4-6 of Table D12 in Dataverse

regress feel01 disagree##c.mc strength i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Favorability") saving(fav_intx_strength.gph, replace)

regress neighbor01 disagree##c.mc strength i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("Neighbor") saving(neigh_intx_strength.gph, replace)

regress house01 disagree##c.mc strength i.GENDER_ i.AGE_ i.ETHNICITY_ i.PARTISANSHIP_ i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)

margins, dydx(disagree) at(mc=(1(1)5)) vsquish
marginsplot, ylab(-0.25(.05)0) yline(0) recast(line) recastci(rarea) ciopts(col(gs10%30)) ytitle("Effect of Disagreement") xtitle("Moral Conviction") title("") subtitle("House") saving(house_intx_strength.gph, replace)

graph combine fav_intx_strength.gph neigh_intx_strength.gph house_intx_strength.gph, rows(2) saving(intx_strength_each.gph, replace)

* value moralization and disagreement effect, using averaged outcome: model 1 of Table A6 in Online Appendix and Figure 5 

gen morals=.
mixed mc ibn.value if support>3, nocons || CaseId:
est store m2
forval x=1/21 {
	replace morals = _b[`x'.value] in `x'
}

gen moralsse=.
mixed mc ibn.value if support>3, nocons || CaseId:
est store m2
forval x=1/21 {
	replace moralsse = _se[`x'.value] in `x'
}

regress polavg disagree##ibn.value inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)
margins, dydx(disagree) at(value=(1(1)21))

matrix B = r(b)
matrix V = r(V)

gen dydx = .
gen se_dydx = .
forval g = 1/21 {
    replace dydx = B[1, 21+`g'] in `g'
    replace se_dydx = sqrt(V[21+`g', 21+`g']) in `g'
}

gen lo_morals=morals-1.96*moralsse
gen hi_morals=morals+1.96*moralsse
gen lo_disagree=dydx-1.96*se_dydx
gen hi_disagree=dydx+1.96*se_dydx

gen obs = _n
gen name = .
replace name = 1 if obs==1
replace name = 1 if obs==2
replace name = 1 if obs==3
replace name = 1 if obs==4
replace name = 1 if obs==5
replace name = 1 if obs==6
replace name = 1 if obs==7
replace name = 1 if obs==8
replace name = 1 if obs==9
replace name = 1 if obs==10
replace name = 2 if obs==11
replace name = 2 if obs==12
replace name = 2 if obs==13
replace name = 2 if obs==14
replace name = 2 if obs==15
replace name = 3 if obs==16
replace name = 3 if obs==17
replace name = 3 if obs==18
replace name = 3 if obs==19
replace name = 3 if obs==20
replace name = 3 if obs==21

pwcorr morals dydx, sig

twoway (scatter dydx morals if name==1, mcol(blue) msize(small) text(-0.208 3.984 "benevolence" -0.187 4.017 "universalism" -0.145 4.02 "conformity", place(e) color(blue) size(small)) text(-0.088 2.924 "power" -0.066 3.151 "hedonism" -0.074 3.464 "self-direction", place(n) color(blue) size(small)) text(-0.115 3.473 "security" -0.0425 3.002 "stimulation", place(s) color(blue) size(small)) text(-0.040 3.119 "achievement" -0.063 3.626 "tradition", place(ne) color(blue) size(small))) (scatter dydx morals if name==2, mcol(green) msize(small) text(-0.171 4.26 "care" -0.163 4.185 "fairness" -0.132 3.795 "loyalty" -0.08 3.535 "authority" -0.109 3.905 "sanctity", place(e) color(green) size(small))) (scatter dydx morals if name==3, mcol(red) msize(small) text(-0.132 4.00 "humanitarianism" -0.089 3.666 "moral traditionalism" -0.123 3.635 "moral tolerance", place(e) color(red) size(small)) text(-0.092 3.524 "limited government" -0.138 3.631 "equality", place(s) color(red) size(small)) text(-0.08 3.335 "individualism", place(s) color(red) size(small)))|| rcap lo_disagree hi_disagree morals, lcol(gs10%10) || rcap lo_morals hi_morals dydx, horiz lcol(gs10%10) legend(order(1 "Schwartz" 3 "Political" 2 "MFT") pos(6) rows(1)) ytitle("Effect of Value Disagreement") xtitle("Value Moralization") subtitle("") saving(twoway_avg_labeled.gph, replace) || lfit dydx morals, lcol(gs5) yline(0)

* favorability: model 2 of Table A6 in Online Appendix
regress feel01 disagree##ibn.value inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)
margins, dydx(disagree) at(value=(1(1)21))

matrix B = r(b)
matrix V = r(V)

gen dydx_fav = .
gen se_dydx_fav = .
forval g = 1/21 {
    replace dydx_fav = B[1, 21+`g'] in `g'
    replace se_dydx_fav = sqrt(V[21+`g', 21+`g']) in `g'
}

gen lo_disagree_fav=dydx_fav-1.96*se_dydx_fav
gen hi_disagree_fav=dydx_fav+1.96*se_dydx_fav

pwcorr morals dydx_fav, sig

* neighbor: model 3 of Table A6 in Online Appendix
regress neighbor01 disagree##ibn.value inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)
margins, dydx(disagree) at(value=(1(1)21))

matrix B = r(b)
matrix V = r(V)

gen dydx_nei = .
gen se_dydx_nei = .
forval g = 1/21 {
    replace dydx_nei = B[1, 21+`g'] in `g'
    replace se_dydx_nei = sqrt(V[21+`g', 21+`g']) in `g'
}

gen lo_disagree_nei=dydx_nei-1.96*se_dydx_nei
gen hi_disagree_nei=dydx_nei+1.96*se_dydx_nei

pwcorr morals dydx_nei, sig

* house: model 4 of Table A6 in Online Appendix
regress house01 disagree##ibn.value inparty outparty i.GENDER_ i.AGE_ i.ETHNICITY_  i.CAREER_ i.RELIGION_ i.EDUCATION_ i.FAVORITEHOBBY_, vce(cluster CaseId)
margins, dydx(disagree) at(value=(1(1)21))

matrix B = r(b)
matrix V = r(V)

gen dydx_hou = .
gen se_dydx_hou = .
forval g = 1/21 {
    replace dydx_hou = B[1, 21+`g'] in `g'
    replace se_dydx_hou = sqrt(V[21+`g', 21+`g']) in `g'
}

gen lo_disagree_hou=dydx_hou-1.96*se_dydx_hou
gen hi_disagree_hou=dydx_hou+1.96*se_dydx_hou

pwcorr morals dydx_hou, sig

* value moralization and disagreement effect, using separate outcomes: Figure 6

twoway (scatter dydx_nei morals if name==1, mcol(blue) msize(small) text(-0.184 4.017 "universalism" -0.1 2.924 "power" -0.136 3.473 "security" -0.13 4.023 "conformity", place(e) color(blue) size(small)) text(-0.0625 3.151 "hedonism" -0.055 3.464 "self-direction", place(n) color(blue) size(small)) text(-0.07 3.12 "stimulation", place(s) color(blue) size(small)) text(-0.030 3.119 "achievement" -0.0585 3.626 "tradition", place(ne) color(blue) size(small)) text(-0.194 3.984 "benevolence", place(s) color(blue) size(small))) (scatter dydx_nei morals if name==2, mcol(green) msize(small) text(-0.145 4.26 "care", place(e) color(green) size(small)) text(-0.162 4.178 "fairness" -0.097 3.531 "authority" -0.132 3.784 "loyalty", place(s) color(green) size(small)) text(-0.094 3.896 "sanctity", place(s) color(green) size(small))) (scatter dydx_nei morals if name==3, mcol(red) msize(small) text(-0.118 3.635 "moral tolerance", place(e) color(red) size(small)) text(-0.083 3.52 "limited gov't", place(n) color(red) size(small)) text(-0.147 3.993 "humanitarianism" -0.088 3.335 "individualism" -0.152 3.64 "equality", place(s) color(red) size(small)) text(-0.09 3.66 "moral traditionalism", place(ne) color(red) size(small))) || rcap lo_disagree_nei hi_disagree_nei morals, lcol(gs10%20) || rcap lo_morals hi_morals dydx_nei, horiz lcol(gs10%20) subtitle("Neighbor") ytitle("Effect of Value Disagreement") xtitle("Value Moralization") yscale(titlegap(-7))  || lfit dydx_nei morals, lcol(gs5) yline(0) ylab(-0.3(.05)0.1) saving(twoway_nei_labeled.gph, replace) graphregion(margin(zero)) legend(order(1 "Schwartz" 3 "Political" 2 "MFT") pos(6) rows(1)) ysize(4.5)

twoway (scatter dydx_hou morals if name==1, mcol(blue) msize(small) text(-0.201 3.988 "benevolence" -0.089 2.924 "power" -0.138 4.023 "conformity" -0.152 4.02 "universalism", place(e) color(blue) size(small)) text(0.025 3.002 "stimulation", place(se) color(blue) size(small)) text(-0.022 3.119 "achievement", place(n) color(blue) size(small)) text(-0.054 3.464 "self-direction" , place(w) color(blue) size(small)) text(-0.056 3.151 "hedonism", place(nw) color(blue) size(small)) text(-0.070 3.472 "security",place(w) color(blue) size(small)) text( -0.065 3.59 "tradition", place(s) color(blue) size(small))) (scatter dydx_hou morals if name==2, mcol(green) msize(small) text(-0.177 4.258 "care" -0.104 4.178 "fairness" -0.131 3.784 "loyalty", place(s) color(green) size(small)) text(-0.043 3.531 "authority", place(ne) color(green) size(small)) text(-0.125 3.896 "sanctity", place(n) color(green) size(small))) (scatter dydx_hou morals if name==3, mcol(red) msize(small) text(-0.093 3.63 "moral tolerance", place(w) color(red) size(small)) text(-0.062 3.524 "limited gov't", place(ne) color(red) size(small)) text(-0.035 3.335 "individualism", place(n) color(red) size(small)) text(-0.062 3.66 "moral traditionalism", place(se) color(red) size(small)) text(-0.103 3.993 "humanitarianism", place(n) color(red) size(small)) text( -0.10 3.631 "equality", place(se) color(red) size(small))) || rcap lo_disagree_hou hi_disagree_hou morals, lcol(gs10%20) || rcap lo_morals hi_morals dydx_hou, horiz lcol(gs10%20) subtitle("House") ytitle("Effect of Value Disagreement") xtitle("Value Moralization") yscale(titlegap(-7))  || lfit dydx_hou morals, lcol(gs5) yline(0) ylab(-0.3(.05)0.1) saving(twoway_hou_labeled.gph, replace) graphregion(margin(zero)) legend(order(1 "Schwartz" 3 "Political" 2 "MFT") pos(6) rows(1))  ysize(4.5)

twoway (scatter dydx_fav morals if name==1, mcol(blue) msize(small) text(-0.151 4.025 "conformity", place(e) color(blue) size(small)) text(-0.135 3.473 "security" -0.230 3.984 "benevolence", place(s) color(blue) size(small)) text(-0.06 3 "stimulation" -0.215 4.017 "universalism", place(n) color(blue) size(small)) text(-0.086 3.16 "hedonism" -0.06 3.119 "achievement" -0.06 3.626 "tradition", place(ne) color(blue) size(small)) text(-0.089 2.924 "power" -0.115 3.464 "self-direction" , place(sw) color(blue) size(small))) (scatter dydx_fav morals if name==2, mcol(green) msize(small) text(-0.223 4.185 "fairness" -0.137 3.795 "loyalty" -0.095 3.9 "sanctity", place(e) color(green) size(small)) text(-0.195 4.249 "care", place(n) color(green) size(small)) text(-0.105 3.53 "authority", place(ne) color(green) size(small))) (scatter dydx_fav morals if name==3, mcol(red) msize(small) text(-0.135 4.005 "humanitarianism" -0.113 3.668 "moral traditionalism" -0.149 3.635 "moral tolerance", place(e) color(red) size(small)) text(-0.159 3.631 "equality", place(s) color(red) size(small)) text(-0.127 3.53 "limited gov't", place(e) color(red) size(small)) text(-0.105 3.335 "individualism", place(n) color(red) size(small))) || rcap lo_disagree_fav hi_disagree_fav morals, lcol(gs10%20) || rcap lo_morals hi_morals dydx_fav, horiz lcol(gs10%20) subtitle("Favorability") ytitle("Effect of Value Disagreement") xtitle("Value Moralization") yscale(titlegap(-7))  || lfit dydx_fav morals, lcol(gs5) yline(0) ylab(-0.3(.05)0.1) saving(twoway_fav_labeled.gph, replace) graphregion(margin(zero)) legend(order(1 "Schwartz" 3 "Political" 2 "MFT") pos(6) rows(1))  ysize(4.5)

graph combine twoway_fav_labeled.gph twoway_nei_labeled.gph twoway_hou_labeled.gph, rows(1) xsize(12) saving(grc_fig6, replace)
















